#!/bin/bash

export SONIC_MGMT_ROOT=/usr/sbin
export SONIC_CLI_ROOT=$SONIC_MGMT_ROOT/cli
if [ -z $SYSTEM_NAME ]
then
 export SYSTEM_NAME="${HOSTNAME%%.*}"
fi

export PYTHONPATH=/usr/sbin/cli:/usr/sbin/cli/scripts:/usr/sbin
export RENDERER_TEMPLATE_PATH=$SONIC_CLI_ROOT/render-templates
export CLISH_PATH=$SONIC_CLI_ROOT/command-tree
export LD_LIBRARY_PATH=/usr/local/lib:$SONIC_CLI_ROOT/.libs:$LD_LIBRARY_PATH
export PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin:$SONIC_CLI_ROOT

export KLISH_CLI_USER=$CLI_USER

$SONIC_CLI_ROOT/clish -o "$@"
